package Mmethod;

import book.book;
import book.booklist;

import java.util.Scanner;

public class addbook implements gather{
    @Override
    public void work(booklist book) {
        Scanner sacn=new Scanner(System.in);
        System.out.println("输入要增加的图书的内容：");
        String name= sacn.nextLine();
        String autro= sacn.nextLine();
        String type= sacn.nextLine();
        int  pice= sacn.nextInt();
        book books=new book(name,autro,type,pice);
        book.setarr(books,book.getBookcontent());
        int a=book.getBookcontent();
        book.setBookcontent(++a);
        System.out.println("增加成功");
    }
}
